package com.ztesoft.book.common.constant;

/**
 * @Description: 常量类
 * @Author: YangFan
 * @Date: 2021-03-19 17:15
 */
public class Constant {

    /**
     * 超级管理员ID
     */
    public static final String SUPER_ADMIN = "1";

    /**
     * 当前页码
     */
    public static final String PAGE = "page";

    /**
     * 每页显示记录数
     */
    public static final String LIMIT = "limit";

    /**
     * 排序字段
     */
    public static final String ORDER_FIELD = "sort";

    /**
     * 排序方式
     */
    public static final String ORDER = "order";

    /**
     * 升序
     */
    public static final String ASC = "asc";

    /**
     * redis-key-前缀-shiro:cache:
     */
    public static final String PREFIX_WULIU = "wuliu:";

    /**
     * redis-key-前缀-shiro:cache:
     */
    public static final String PREFIX_API_HISTORY = "api:history:";

    /**
     * redis-key-前缀-captcha:
     */
    public static final String PREFIX_CAPTCHE = "captcha:";

    /**
     * redis-key-前缀-shiro:cache:
     */
    public static final String PREFIX_SHIRO_CACHE = "shiro:cache:";

    /**
     * 发票邮件发送前缀-invoice:
     */
    public static final String PREFIX_INVOICE = "invoice:";

    /**
     * redis-key-前缀-shiro_refresh_token:
     */
    public static final String PREFIX_SHIRO_REFRESH_TOKEN = "shiro:token:";

    /**
     * redis-key-分类树category_tree:
     */
    public static final String CATEGORY_TREE = "category_tree";

    /**
     * redis-key-分类树hot_book_list:
     */
    public static final String HOT_BOOK_LIST = "hot_book_list";

    /**
     * redis-key-excel错误信息:
     */
    public static final String EXCEL_ERROR_ID = "excel_error_id:";

    /**
     * JWT-userid:
     */
    public static final String USERID = "userid";
    /**
     * JWT-snoOrOpenid:学号或者openid
     */
    public static final String SNOOROPENID = "snoOrOpenid";

    /**
     * JWT-username:
     */
    public static final String USERNAME = "username";

    /**
     * JWT-currentTimeMillis:
     */
    public static final String CURRENT_TIME_MILLIS = "currentTimeMillis";

    /**
     * RedisToken中的User对象名称
     */
    public static final String REDIS_TOKEN_USER_NAME = "user";

    /**
     * 请求类型GET
     */
    public static final String GET = "GET";

    /**
     * 请求类型POST
     */
    public static final String POST = "POST";

    /**
     * CODE键名称
     */
    public static final String CODE = "code";

    /**
     * ROLE键名称
     */
    public static final String ROLE = "ROLE";

    /**
     * 微信订单状态
     */
    public static final String WX_TRADE_STATE = "trade_state";

    /**
     * 未支付
     */
    public static final String NOTPAY = "NOTPAY";

    /**
     * 支付成功
     */
    public static final String SUCCESS = "SUCCESS";

    /**
     * 微信小程序token前缀
     */
    public static final String PREFIX_WX_XCX_TOKEN = "wx:xcx:token:";

    /**
     * 微信小程序SessionKey前缀
     */
    public static final String PREFIX_WX_XCX_SESSIONKEY = "wx:xcx:sessionkey:";

    /**
     * 商户管理员权限code
     */
    public static final String ROLE_MERCHANT_ADMIN = "merchantAdmin";
    /**
     * 超级管理员权限code
     */
    public static final String ROLE_ADMIN = "admin";

    /**
     * 公钥redis缓存前缀
     */
    public static final String PUBLIC_KEY_PREFIX = "publicKey::";

    /**
     * 公钥缓存超时时间300s
     */
    public static final long PUBLIC_KEY_EXPIRE = 300L;

    /**
     * header 认证的key
     */
    public static final String HTTP_HEADER = "token";

    /**
     * 测试通用token
     */
    public static final String TOKEN_TEST = "test";
}
